package com.xyy.yueshijia.shopping;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.xyy.yueshijia.R;

/**
 * Created by Asus on 2017/2/7.
 */

public class ShoppingFragment extends Fragment {


    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=LayoutInflater.from(getActivity()).inflate(R.layout.shoppingfragment,container,false);
        view.findViewById(R.id.login).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //购物篮登陆button到登陆页
                Intent intent =new Intent(getActivity(), LoginActivity.class);
                startActivity(intent);
            }
        });

        view.findViewById(R.id.registr).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //购物篮登陆button到登陆页
                Intent intent =new Intent(getActivity(), RegisterActivity.class);
                startActivity(intent);
            }
        });

        return view;
    }


    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        TextView yanZhengMa = (TextView) view.findViewById(R.id.shop_et_yanzhengma);


       /* yanZhengMa.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //购物篮注册button, 到注册页
                Intent intent =new Intent(getActivity(), RegisterActivity.class);
                startActivity(intent);
            }
        });*/

    }




}
